package com.gcd.gym.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gcd.gym.model.searchModel.CourseSearchModel;
import com.gcd.gym.model.searchModel.ReserveSearchModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CourseMapper extends BaseMapper<CourseSearchModel> {
    // 查询课程
    Page<CourseSearchModel> findCourse(Page<CourseSearchModel> page,CourseSearchModel course);

    // 删除课程
    int deleteCourseById(List<Integer> ids);

    // 添加课程
    int addCourse(CourseSearchModel course);

    int updateCourse(CourseSearchModel course);

    // 查询课程的会员
    List<ReserveSearchModel> memberOfCourse(Integer id);

    // 签到
    int checkIn(ReserveSearchModel  reserve);
    int markAbsent(ReserveSearchModel  reserve);

}
